<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="shortcut icon" href="img/favicon.png">

    <title><?php echo Yii::app()->params['system']; ?></title>

    <!-- Bootstrap CSS -->
    <link href="appui/css/bootstrap.min.css" rel="stylesheet">
    <!-- bootstrap theme -->
    <link href="appui/css/bootstrap-theme.css" rel="stylesheet">
    <!--external css-->
    <!-- font icon -->
    <link href="appui/css/elegant-icons-style.css" rel="stylesheet"/>
    <link href="appui/css/font-awesome.css" rel="stylesheet"/>
    <!-- Custom styles -->
    <link href="appui/css/widgets.css" rel="stylesheet">
    <link href="appui/css/style.css" rel="stylesheet">
    <link href="appui/css/style-responsive.css" rel="stylesheet"/>
    <link href="appui/css/jquery-ui-1.10.4.min.css" rel="stylesheet">
    <script src="appui/js/jquery.js"></script>
    <!-- javascripts -->
    <script src="appui/js/jquery.js"></script>
    <script src="appui/js/jquery-ui-1.10.4.min.js"></script>
    <script src="appui/js/jquery-1.8.3.min.js"></script>
    <script type="text/javascript" src="appui/js/jquery-ui-1.9.2.custom.min.js"></script>
    <!-- bootstrap -->
    <script src="appui/js/bootstrap.min.js"></script>
</head>

<body>
<!-- container section start -->
<section id="container" class="">


    <header class="header dark-bg">
        <div class="toggle-nav">
            <div class="icon-reorder tooltips" data-original-title="Toggle Navigation" data-placement="bottom"><i
                        class="icon_menu"></i></div>
        </div>

        <!--logo start-->
        <a href="index.html" class="logo">RANKO <span class="lite">.CN</span></a>
        <!--logo end-->


        <div class="top-nav notification-row">
            <!-- notificatoin dropdown start-->
            <ul class="nav pull-right top-menu">
                <!-- user login dropdown start-->
                <li class="dropdown">
                    <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                        <span class="username"><?php
                            echo Yii::app()->user->realname;
                            ?></span>
                        <b class="caret"></b>
                    </a>
                    <ul class="dropdown-menu extended logout">
                        <div class="log-arrow-up"></div>
                        <?php
                        if (Yii::app()->user->checkAccess('personalconfig')) {
                        ?>
                            <li class="eborder-top">
                                <a href="index.php?r=user/config"><i class="icon_profile"></i> 个人设置</a>
                            </li>
                        <?php
                        }
                        ?>


                        <li>
                            <a href="index.php?r=site/loginout"><i class="icon_key_alt"></i>退出</a>
                        </li>
                    </ul>
                </li>
                <!-- user login dropdown end -->
            </ul>
            <!-- notificatoin dropdown end-->
        </div>
    </header>
    <!--header end-->

    <!--sidebar start-->
    <aside>
        <div id="sidebar" class="nav-collapse ">
            <!-- sidebar menu start-->
            <ul class="sidebar-menu">
                <li class="" id="menu_workspace">
                    <a class="" href="index.php?r=site/home">
                        <i class="fa fa-home fa-lg"></i>
                        <span>控制面板</span>
                    </a>
                </li>
                <?php
                foreach ($this->menus as $menu) {
                    if (Yii::app()->user->checkAccess($menu['menupermission'])) {
                        ?>
                        <li class="sub-menu " id="menu_<?php echo $menu['menupermission']; ?>">
                            <a href="javascript:;" class="">
                                <i class="<?php echo $menu['iconcls']; ?>"></i>
                                <span><?php echo $menu['menutext']; ?></span>
                                <?php
                                if (sizeof($menu['items']) > 0) {
                                    ?>
                                    <span class="menu-arrow arrow_carrot-right"></span>
                                    <?php
                                }
                                ?>
                            </a>
                            <?php
                            if (sizeof($menu['items']) > 0) {
                                ?>
                                <ul class="sub">
                                    <?php
                                    foreach ($menu['items'] as $item) {
                                        if (Yii::app()->user->checkAccess($item['menupermission'])) {
                                            ?>
                                            <li><a id="item_<?php echo $item['menupermission']; ?>" class=""
                                                   href="<?php echo $item['menuitemurl']; ?>"><?php echo $item['menutext']; ?></a>
                                            </li>
                                            <?php
                                        }
                                    }
                                    ?>
                                </ul>
                                <?php
                            }
                            ?>
                        </li>
                        <?php
                    }

                }
                ?>
            </ul>
            <!-- sidebar menu end-->
        </div>
    </aside>
    <!--sidebar end-->
    <!--main content start-->
    <section id="main-content">
        <section class="wrapper">
            <?php echo $content; ?>
        </section>
        <div class="text-right">

        </div>
    </section>
    <!--main content end-->
</section>
<!-- container section start -->


<!-- nice scroll -->
<script src="appui/js/jquery.scrollTo.min.js"></script>
<script src="appui/js/jquery.nicescroll.js" type="text/javascript"></script>
<!--custome script for all page-->
<script src="appui/js/scripts.js"></script>
<!-- custom script for this page-->
<script src="appui/js/jquery.autosize.min.js"></script>
<script src="appui/js/jquery.placeholder.min.js"></script>
<script src="appui/js/gdp-data.js"></script>
<script src="appui/js/morris.min.js"></script>
<script src="appui/js/sparklines.js"></script>
<script src="appui/js/charts.js"></script>
<script src="appui/js/jquery.slimscroll.min.js"></script>
<script>
    $(function () {
    });
</script>
</body>
</html>
